import config from "@/config"
import http from "@/utils/request"

export default {
	//模板对象
	object:{
		list: {
			url: `${config.API_URL}/adminapi/shop.shopPrintGroup/lists`,
			name: "获取列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        all: {
			url: `${config.API_URL}/adminapi/shop.shopPrintGroup/all`,
			name: "全部",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.shopPrintGroup/edit`,
			name: "修改",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.shopPrintGroup/add`,
			name: "添加",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shopPrintGroup/delete`,
			name: "删除",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/shop.shopPrintGroup/detail`,
			name: "详情",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
	},
	//表单字段
	formMenu:{
		list: {
			url: `${config.API_URL}/adminapi/shop.shopFormField/lists`,
			name: "获取列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		all: {
			url: `${config.API_URL}/adminapi/shop.shopFormField/all`,
			name: "全部",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.shopFormField/edit`,
			name: "修改",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.shopFormField/add`,
			name: "添加",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shopFormField/delete`,
			name: "删除",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		detail: {
			url: `${config.API_URL}/adminapi/shop.shopFormField/detail`,
			name: "详情",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
	},
	//自定义模板
	template:{
		list: {
			url: `${config.API_URL}/adminapi/shop.shopPrintTemplates/lists`,
			name: "获取列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		all: {
			url: `${config.API_URL}/adminapi/shop.shopPrintTemplates/all`,
			name: "全部",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.shopPrintTemplates/edit`,
			name: "修改",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.shopPrintTemplates/add`,
			name: "添加",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shopPrintTemplates/delete`,
			name: "删除",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		detail: {
			url: `${config.API_URL}/adminapi/shop.shopPrintTemplates/detail`,
			name: "详情",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		editTemplate: {
			url: `${config.API_URL}/adminapi/shop.shopPrintTemplates/editTemplate`,
			name: "编辑模板内容",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		printContant: {
			url: `${config.API_URL}/adminapi/shop.shopPrintTemplates/getPrintConfig`,
			name: "打印内容",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		copy: {
			url: `${config.API_URL}/adminapi/shop.shopPrintTemplates/copy`,
			name: "复制新增",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
}
